import { Body, Controller, Delete, Get, Param, Patch, Post, Query, Req } from '@nestjs/common'
import { QueryListDto, ResponseListDto } from './dto'
import { isEmpty } from 'rxjs'
import { ResultData } from './response/result'
import { ApiBearerAuth } from '@nestjs/swagger'

@ApiBearerAuth()
export class BaseController<T, K> {
  service = null
  constructor(service: K) {
    this.service = service
  }

  Success(data, msg){
    return ResultData.success(data, msg)
  }

  Fail(data, msg){
    return ResultData.fail(400, data, msg)
  }
}
